//
//  GeometryCalculation.h
//  Portable Traffic Signal Assistor
//
//  Created by Hao Xu on 6/1/12.
//  Copyright (c) 2012 TTU. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <MapKit/MapKit.h>
#import <CoreLocation/CoreLocation.h>
#import "Signal.h"
#import "XMLParser.h"

@interface GeometryCalculation : NSObject 



- (Signal *)calculateNextSignal:(NSArray *)signalList newHeading:(float)newHeading coordinate:(CLLocationCoordinate2D)coordinate agency:(Agency *)agency subSystem:(SubSystem *)subSystem;

+(float) calculateUserAngle:(CLLocationCoordinate2D)user signal:(CLLocationCoordinate2D)signal;

+ (float) distanceOfTwoCoordinates:(CLLocationCoordinate2D)coordA coordB:(CLLocationCoordinate2D)coordB;
+(int)calculateNextSignalIndex:(NSArray *)signalList newHeading:(float)newHeading coordinate:(CLLocationCoordinate2D)coordinate agency:(Agency *)agency subSystem:(SubSystem *)subSystem;
+ (Signal *)calculateNextSignal:(Signal *)signal heading:(float)heading  agency:(Agency *)agency subSystem:(SubSystem *)subSystem timingPattern:(TimingPattern *)timingPattern;
+ (Link *) getlinkBetweenTwoIntersections:(NSString *)intersection1ID intersection2ID:(NSString *)intersection2ID subSystemID:(NSString *)subSystemID agencyID:(NSString *)agencyID;

@end
